package cn.yto.print.config.i18n;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

@Component
public class LocaleLanguageSubject {

    private final ApplicationEventPublisher eventPublisher;

    @Autowired
    public LocaleLanguageSubject(ApplicationEventPublisher eventPublisher) {
        this.eventPublisher = eventPublisher;
    }

    public void publishChangeEvent() {
        eventPublisher.publishEvent(new LocaleChangeEvent(this));
    }

}
